<ion-header>
    <ion-navbar color="orange">
        <ion-title>
            详情
        </ion-title>
    </ion-navbar>
</ion-header>

<ion-content>
    <div class="ht-f1f1f1">
        <!-- 内容开始 -->
        <div class="ht-background ht-100 ht-overflow ht-margin-bottom" padding>
            <div class="ht-100 ht-overflow ht-font-14 ht-666 ht-padding-bottom10">
                <div [innerHTML]="infoData.auto_content"></div>
            </div>
            <div class="flex flex-align-center flex-line-between">
                <div class="ht-overflow" (click)="like(infoData.amoy_id)">
                    <i class="far fa-heart" [ngClass]="{'text-red': liked}"></i>
                    <span class="">赞 {{infoData['zan_num']}}</span>
                </div>
                <div class="ht-overflow ht-999">
                    {{infoData.add_time}}
                </div>
            </div>
        </div>
        <div class="break-line"></div>
        <div class="msg-box" padding>
            <h5>留言</h5>
            <div class="message">
                <input type="text" placeholder="自古留言出人才" [(ngModel)]="msgData['content']">
                <button (click)="sendMsg()">发送</button>
            </div>
        </div>
        <div class="msg-list" padding *ngIf="comments.total > 0">
            <div class="msg-item" margin-top *ngFor="let comment of comments['lists']">
                <div class="flex flex-line-between flex-align-center">
                    <div class="flex flex-align-center">
                        <div>
                            <!--<img [src]="util.parseImageUrl(comment)" alt="" class="headimg">-->
                        </div>
                        <div>
                            <p>{{comment['nickname']}}</p>
                            <p>{{comment['create_time']}}</p>
                        </div>
                    </div>
                    <div (click)="reply.showComment(infoData.amoy_id, {user_id:comment['user_id'], nick_name: comment['nickname'], reply_id: comment['id']})">
                        <i class="far fa-comment"></i> 评论
                    </div>
                </div>
                <div class="msg-content" padding-top padding-bottom>
                    {{comment['content']}}
                </div>
                <div class="sub-comment ht-line-30" padding *ngIf="comment['child'] && comment['child'].length">
                    <p *ngFor="let child of comment['child']"
                       (click)="reply.showComment(infoData.amoy_id, {user_id:child['user_id'], nick_name: child['u_name'], reply_id: comment['id']})">
                        <span style="color:#3388aa;">{{child['u_name']}}</span><span style="color:#999;">回复{{child['p_name']}}：{{child['content']}}</span>
                    </p>
                </div>
            </div>
        </div>
    </div>
</ion-content>
<share-overlay #share></share-overlay>
<comment #reply [showType]="false" (outer)="sendMsgSuccess($event)"></comment>
